<template>
  <div class="person-auth" ww3 auto>
    <el-page-header @back="goBack" content="公告详情"> </el-page-header>
    <div class="notice-title">
      <p>{{message.title}}</p>
      <span class="time">{{message.createTime}}</span>
    </div>
    <div class="notice-content">
      <h1 style="text-align:center;margin-bottom:30px"><strong>{{message.title}}</strong></h1>
      <div v-html="message.contents"></div>
    </div>
  </div>
</template>

<script>
import $http from "@/api/info/info"
export default {
  data() {
    return {
      id: null,
      message: {}
    }
  },
  mounted() {
    this.content = sessionStorage.getItem("cmsInformContent");
    this.id = this.$route.params.id;
    this.cmsInformDetailed();
  },
  methods: {
    goBack() {
      this.$router.go(-1)
    },
    /**
     * 获取公告详情
     */
    cmsInformDetailed() {
      let that = this;
      let data = {
        id: this.id
      };
      $http.cmsInformDetailed(data).then(res => {
        that.message = res.data;
        console.log(that.message);
      })

    },
  }
}
</script>

<style scoped>
.notice-content h1{
  color: #555;
  font-weight: 600;
  font-size: 32px;
  margin-bottom: 30px;
}
.notice-title{
  font-size: var(--title-small);
  color: var(--green);
  margin-bottom: 50px;
  height: 62px;
  line-height: 62px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid #d9dcde;
}
.time{
  position: absolute;
  bottom: 0;
  right: 0;
  color: var(--nav-color);
}
</style>
